<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    * {
      padding: 0;
      margin: 0;
    }
  </style>
</head>

<body>
  <canvas id="canvas"></canvas>
  <script type="module">
    // 多姿多彩的画布
    import { Color } from "https://unpkg.com/three/build/three.module.js";
    const color = new Color(1, 0, 0);
    const canvas = document.getElementById('canvas');
    canvas.width = window.innerWidth;
    canvas.height = window.innerHeight;
    const gl = canvas.getContext('webgl');
    !(function ani() {
      color.offsetHSL(0.005, 0, 0);
      gl.clearColor(color.r, color.g, color.b, 1);
      gl.clear(gl.COLOR_BUFFER_BIT);
      requestAnimationFrame(ani);
    })();
  </script>
</body>

</html>